/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.transas.zorlog.data;

/**
 * Scaled index implementation of TimeSource interface.
 * @author amalikov
 */
public class TimeSourceFromIndex extends TimeSource {

	public TimeSourceFromIndex(double scale, TimeFormatter formatter, float playbackRate) {
		super(formatter, playbackRate);
		this.scale = scale;
	}
	
	public TimeSourceFromIndex(double scale, TimeFormatter formatter) {
		this(scale, formatter, 0.05f);
	}
	
	@Override
	public double getValue(int index) {
		return index * scale;
	}

	private final double scale;
}
